package com.edu.model.tree.v1;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class TreeNode<T> implements Serializable{
    private T data;
    private List<TreeNode<T>> childrenNode = new ArrayList<>();

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public List<TreeNode<T>> getChildrenNode() {
        return childrenNode;
    }

    public void setChildrenNode(List<TreeNode<T>> childrenNode) {
        this.childrenNode = childrenNode;
    }

    public TreeNode(T data, List<TreeNode<T>> childrenNode) {
        this.data = data;
        this.childrenNode = childrenNode;
    }

    public TreeNode(T data) {
        this.data = data;
    }

    public TreeNode() {
    }
}
